<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="roleDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='roleDetail.heading'/>"/>
    <meta name="menu" content="AdminMenu"/>
</head>
<div class="jquery_tab_container">
    <span class="heading_tab advanced_link active tab1"><fmt:message key="roleList.title"/></span>
</div>

<div class="jquery_tab">
    <div class="content_block"></div>
<form:form commandName="role" method="post" action="roleform" id="roleForm" onsubmit="return validateRole(this)">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>

    <p>
        <appfuse:label styleClass="left width50" key="role.name"/>
        <form:input path="name" id="name" cssClass="input-medium left" cssErrorClass="input-medium left error" maxlength="50"/>
        <form:errors path="name" cssClass="fieldError"/>
        <br class="clearboth" />
    </p>
    <p>
        <appfuse:label styleClass="left width50" key="role.description"/>
        <form:textarea path="description" id="description" cssClass="input-medium left" cssErrorClass="input-medium left error" maxlength="50"/>
        <form:errors path="description" cssClass="fieldError"/>
        <br class="clearboth" />
    </p>

    
        <input type="submit" class="button" name="save" value="<fmt:message key="button.save"/>"/>
        <c:if test="${not empty role.id}">
        <input type="submit" class="button" name="delete" onclick="bCancel=true;return confirmDelete('role')"
            value="<fmt:message key="button.delete"/>" />
        </c:if>
        <input type="submit" class="button" name="cancel" value="<fmt:message key="button.cancel"/>" onclick="bCancel=true"/>
  

</form:form>
<br /><br /><br /></div>
<v:javascript formName="role" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<c:url value='/scripts/validator.jsp'/>"></script>

<script type="text/javascript">
    Form.focusFirstElement($('roleForm'));
</script>
